﻿
namespace EasyStep.Business.Providers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using EasyStep.Data.Entities;
    using EasyStep.Business.Interfaces.Providers;
    using NHibernate.Criterion;

    public class TestStepProvider : DataProviderBase<TestStep>, ITestStepProvider
    {
        public IEnumerable<TestStep> GetTestSteps(Guid forTest)
        {
            using (var sm = CreateSessionManager(true))
            {
                return sm.Session.CreateCriteria<TestStep>()
                    .Add(Expression.Eq("TestId", forTest))
                    .List<TestStep>();
            }
        }
    }
}
